/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package main.social.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author user
 */
@Embeddable
public class FriendsPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "Users_id", nullable = false)
    private long usersid;
    @Basic(optional = false)
    @Column(name = "Users_friend", nullable = false)
    private long usersfriend;

    public FriendsPK() {
    }

    public FriendsPK(long usersid, long usersfriend) {
        this.usersid = usersid;
        this.usersfriend = usersfriend;
    }

    public long getUsersid() {
        return usersid;
    }

    public void setUsersid(long usersid) {
        this.usersid = usersid;
    }

    public long getUsersfriend() {
        return usersfriend;
    }

    public void setUsersfriend(long usersfriend) {
        this.usersfriend = usersfriend;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) usersid;
        hash += (int) usersfriend;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FriendsPK)) {
            return false;
        }
        FriendsPK other = (FriendsPK) object;
        if (this.usersid != other.usersid) {
            return false;
        }
        if (this.usersfriend != other.usersfriend) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "main.social.entity.FriendsPK[ usersid=" + usersid + ", usersfriend=" + usersfriend + " ]";
    }
    
}
